home *** CD-ROM | disk | FTP | other *** search
-
- {
- if(true)
- {
- CThingContainer = §§newclass(CThingContainer,CThingBase);
- }
- }
-
- package Local.Game.Thing
- {
- import Local.Game.World.Map.*;
- import flash.events.*;
- import flash.geom.*;
-
- public class CThingContainer extends CThingBase
- {
-
- public static const ADDED:String = "ADDED";
-
- public static const GROUPID_FRIEND:int = 1;
-
- public static const GROUPID_ENEMY:int = 2;
-
- public static const REMOVED:String = "REMOVED";
-
-
- private var _GroupID:int;
-
- private var mThings:Array;
-
- public var mParent:*;
-
- public function CThingContainer()
- {
- super();
- }
-
- public function get mChildren() : Array
- {
- if(true)
- {
- return !!mThings ? mThings.slice() : [];
- }
- §§goto(addr13);
- }
-
- internal function GetKilledBy() : CThingContainer
- {
- if(true)
- {
- §§push(mParent);
- if(mParent)
- {
- §§pop();
- if(true)
- {
- §§push(mBaseType == "shot");
- if(!(mBaseType == "shot"))
- {
- §§pop();
- if(true)
- {
- return (mBaseType == "weapon" || mBaseType == "effect") && Boolean(mParent.mBaseType) ? mParent.GetKilledBy() : this;
- addr37:
- }
- §§goto(addr40);
- }
- §§goto(addr37);
- }
- §§goto(addr48);
- }
- §§goto(addr37);
- }
- §§goto(addr52);
- }
-
- private function Process_Dispose() : void
- {
- if(!Process_Children())
- {
- Dispose();
- }
- }
-
- public function get mNumChildren() : int
- {
- if(true)
- {
- if(mThings)
- {
- addr13:
- §§push(int(mThings.length));
- if(true)
- {
- }
- }
- else
- {
- §§push(0);
- }
- return §§pop();
- }
- §§goto(addr13);
- }
-
- public function Process_Children() : Boolean
- {
- var _loc1_:* = undefined;
- for each(_loc1_ in mChildren)
- {
- if(_loc1_.Process)
- {
- _loc1_.Process();
- }
- }
- return mNumChildren > 0;
- }
-
- public function get mGroupID() : int
- {
- §§push(§§findproperty(_GroupID));
- if(true)
- {
- §§push(!_GroupID);
- if(true)
- {
- §§push(§§pop() && mParent);
- }
- return §§pop()._GroupID = !!§§pop() ? int(mParent.mGroupID) : _GroupID;
- }
- §§goto(addr29);
- }
-
- public function RemoveThing(param1:*) : *
- {
- if(true)
- {
- param1.mParent = null;
- if(true)
- {
- mThings.splice(mThings.indexOf(param1),1);
- if(true)
- {
- if(mThings.length)
- {
- }
- param1.dispatchEvent(new Event(REMOVED));
- addr49:
- return param1;
- addr37:
- }
- mThings = null;
- }
- §§goto(addr37);
- }
- §§goto(addr49);
- }
-
- public function Draw_Children() : Boolean
- {
- var _loc1_:* = undefined;
- for each(_loc1_ in mChildren)
- {
- _loc1_.Draw();
- }
- return true;
- }
-
- override public function Dispose() : void
- {
- var _loc1_:* = undefined;
- if(true)
- {
- if(mDisposed)
- {
- if(true)
- {
- return;
- }
- }
- else if(mParent)
- {
- mParent.RemoveThing(this);
- }
- if(mThings)
- {
- addr35:
- for each(_loc1_ in mThings.slice())
- {
- if(true)
- {
- _loc1_.Dispose();
- }
- }
- }
- super.Dispose();
- return;
- }
- §§goto(addr35);
- }
-
- public function set mGroupID(param1:int) : void
- {
- _GroupID = param1;
- }
-
- public function mChildrenCount() : int
- {
- return mThings.length;
- }
-
- override public function toString() : String
- {
- return mType + "." + String(_GroupID) + "." + String(nID);
- }
-
- public function AddThing(param1:*) : *
- {
- if(param1.mParent)
- {
- param1.mParent.RemoveThing(param1);
- }
- param1.mParent = this;
- if(mThings)
- {
- mThings.push(param1);
- }
- else
- {
- mThings = [param1];
- }
- param1.dispatchEvent(new Event(ADDED));
- return param1;
- }
-
- public function AddKill() : *
- {
- if(true)
- {
- return !!mParent ? mParent.AddKill() : this;
- }
- §§goto(addr13);
- }
- }
- }
-